package cn.huiyunche.driver.datasync.controller;

import cn.huiyunche.base.service.interfaces.DWaybillService;
import cn.huiyunche.base.service.model.DWaybill;
import cn.huiyunche.base.service.model.DWaybillExample;
import cn.huiyunche.base.service.model.SUser;
import cn.huiyunche.base.service.vo.Result;
import cn.huiyunche.base.service.vo.TmsQueueDriverVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/bmsOrderSync")
public class BmsOrderSyncController {

    @Autowired
    private DWaybillService dWaybillService= null;
    /**
     * bms发运时间
     * @return
     **/
    @RequestMapping(value = "/orderShippingTime", method = RequestMethod.GET)
    public
    @ResponseBody
    Result<Object> accountingPrice(@RequestParam("orderCodes")String orderCodes) {
        Result<Object> result = new Result<>(true, "查询成功");
        try {
            List<DWaybill> waybill = dWaybillService.getWaybill(orderCodes);
            result.setData(waybill);
        } catch (Exception e) {
            result.setSuccess(false);
            result.setMessage(e.getMessage());
        }
        return result;
    }
}
